package person;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025/5/11
 * Time: 01:55
 */
//Money类中也实现Cloneable接口并重写clone()方法
public class Money implements Cloneable {
    public int money;
    //
    public Money(int money) {
        this.money = money;
    }
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
    @Override
    public String toString() {
        return "Money{" +
                "money=" + money +
                '}';
    }
}
